Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy: Remove unneeded ?Sized bound and replace never type with () #1758

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Sep 6, 2024

Tiny PR to fix a clippy warning detected in: https://github.com/paritytech/subxt/actions/runs/10735929095/job/29774331171

error: `?Sized` bound is ignored because of a `Sized` requirement
   --> core/src/storage/storage_key.rs:185:25
    |
185 | impl<K: codec::Decode + ?Sized> StaticStorageKey<K> {
    |                         ^^^^^^
    |
note: `K` cannot be unsized because of the bound
   --> core/src/storage/storage_key.rs:185:9
    |
185 | impl<K: codec::Decode + ?Sized> StaticStorageKey<K> {
    |         ^^^^^^^^^^^^^
    = note: ...because `Decode` has the bound `Sized`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
    = note: `-D clippy::needless-maybe-sized` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::needless_maybe_sized)]`
help: change the bounds that require `Sized`, or remove the `?Sized` bound
    |
185 - impl<K: codec::Decode + ?Sized> StaticStorageKey<K> {
185 + impl<K: codec::Decode> StaticStorageKey<K> {

Signed-off-by: Alexandru Vasile <[email protected]>
@lexnv lexnv self-assigned this Sep 6, 2024
@lexnv lexnv requested a review from a team as a code owner September 6, 2024 13:55
Signed-off-by: Alexandru Vasile <[email protected]>
@lexnv lexnv changed the title storage: Remove ?Sized bound to fix clippy clippy: Remove unneeded ?Sized bound and replace never type with () Sep 6, 2024
Signed-off-by: Alexandru Vasile <[email protected]>
@niklasad1 niklasad1 merged commit 2471aef into master Sep 6, 2024
13 checks passed
@niklasad1 niklasad1 deleted the lexnv/fix-clippy branch September 6, 2024 15:14
@jsdw jsdw mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants